package cn.iocoder.yudao.module.handguard.controller.app.zoneprices;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.handguard.controller.admin.zoneprice.vo.*;
import cn.iocoder.yudao.module.handguard.convert.zoneprice.ZonePriceConvert;
import cn.iocoder.yudao.module.handguard.dal.dataobject.zoneprice.ZonePriceDO;
import cn.iocoder.yudao.module.handguard.service.zoneprice.ZonePriceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.Collection;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;

@Tag(name = "小程序 - 用户")
@RestController
@RequestMapping("/hutai/zoneprice")
@Validated
public class ZonePricesController {

    @Resource
    private ZonePriceService zonePriceService;



    @GetMapping("/getZonePriceListByAreaAndName")
    @Operation(summary = "")
    public CommonResult<List<ZonePriceRespVO>> getZonePriceListByAreaAndName(@RequestParam("area") String area,@RequestParam("name") String name) {
        List<ZonePriceDO> list = zonePriceService.getZonePriceListByAreaAndName(area,name);
        return success(ZonePriceConvert.INSTANCE.convertList(list));
    }



}
